package com.yunsom.testdemo.design.mediator;

/**
 * @author Xbao
 * @description 中介者模式
 * @date 2022/6/22 11:51
 */
public class TestMediator {

  public static void main(String[] args) throws InterruptedException {
    User jack = new User("Jack");
    User maria = new User("Maria");

    jack.sendMessage("Hello? is anyone here?");
    Thread.sleep(1000);
    maria.sendMessage("Hi, I'm here.");

  }
}
